//
//  JumpViewController.m
//  K8彩票
//
//  Created by zhoubo on 2017/7/8.
//  Copyright © 2017年 zhoubo. All rights reserved.
//

#import "JumpViewController.h"
#import <SVProgressHUD.h>

@interface JumpViewController ()<UIWebViewDelegate>

@property (nonatomic,strong) UIWebView* webview;

@end

@implementation JumpViewController

-(void)viewDidLoad
{
    [super viewDidLoad];
    self.webview = [[UIWebView alloc]init];
    self.webview.delegate = self;
    [self.view addSubview:self.webview];


    
}

-(void)setUrlstr:(NSString *)urlstr
{
    _urlstr = urlstr;
    NSURL* url = [NSURL URLWithString:urlstr];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [self.webview loadRequest:request];
    [SVProgressHUD showWithStatus:@"加载中..."];
}
                  
                  

-(void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
    self.webview.frame = self.view.bounds;
}

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
    return YES;
}
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [SVProgressHUD dismiss];
}

@end
